package com.hnluchuan.bmjlearning.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.hnluchuan.core.model.BaseModel;

import javax.persistence.ManyToOne;
import java.util.Date;
import com.hnluchuan.bmjlearning.model.User;
import javax.persistence.JoinColumn;
import javax.persistence.FetchType;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 代理商
 */
@Entity
@Table(name = "t_agent") 
public class Agent extends BaseModel {
	private static final long serialVersionUID = 1L;
	
	public Agent() {
	}
	
	public Agent(Long id) {
		this.id = id;
	}
	
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
	private Long id;
	/**
	 * 对应用户
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id")
	private User user;
	/**
	 * 状态，0禁用，1启用
	 */
	@Column(name = "status")    		
	private Integer status;
	/**
	 * 机构名称
	 */
	@Column(name = "org_name")    		
	private String orgName;
	/**
	 * 负责人
	 */
	@Column(name = "manager")    		
	private String manager;
	/**
	 * 手机
	 */
	@Column(name = "mobile")    		
	private String mobile;
	/**
	 * 客户总数
	 */
	@Column(name = "customers")    		
	private Integer customers;
	/**
	 * 创建时间
	 */
	@DateTimeFormat(pattern = "")
	@Column(name = "created")
	private Date created;
	// fields end
	
	/** id */
	public Long getId() {
    	return id;
    }
    /** id */
    public void setId(Long id) {
    	this.id = id;
    }
	/** 对应用户 */
	public User getUser() {
    	return user;
    }
    /** 对应用户 */
    public void setUser(User user) {
    	this.user = user;
    }
	/** 状态，0禁用，1启用 */
	public Integer getStatus() {
    	return status;
    }
    /** 状态，0禁用，1启用 */
    public void setStatus(Integer status) {
    	this.status = status;
    }
	/** 机构名称 */
	public String getOrgName() {
    	return orgName;
    }
    /** 机构名称 */
    public void setOrgName(String orgName) {
    	this.orgName = orgName;
    }
	/** 负责人 */
	public String getManager() {
    	return manager;
    }
    /** 负责人 */
    public void setManager(String manager) {
    	this.manager = manager;
    }
	/** 手机 */
	public String getMobile() {
    	return mobile;
    }
    /** 手机 */
    public void setMobile(String mobile) {
    	this.mobile = mobile;
    }
	/** 客户总数 */
	public Integer getCustomers() {
    	return customers;
    }
    /** 客户总数 */
    public void setCustomers(Integer customers) {
    	this.customers = customers;
    }
	/** 创建时间 */
	public Date getCreated() {
    	return created;
    }
    /** 创建时间 */
    public void setCreated(Date created) {
    	this.created = created;
    }
	
}
